package model;

import java.util.Date;

/** 
 * Class containing information relevant to a Conference, namely
 * the title of conference, dates, size, location and 
 * deadlines. Has public getters to access each field. Each value
 * is initialized at construction with values passed in from
 * calling class.
 * @author Jeff Kuhlman
 */
public class Conference {
	
	/**
	 *  Unique conference ID 
	 */
	private int my_conf_ID;
	
	/**
	 *  Name of conference
	 */
	private final String my_name;
	
	/**
	 *  Dates of conference start 
	 */
	private final Date my_start_date;
	
	/**
	 *  Dates of conference end
	 */
	private final Date my_end_date;
	
	/**
	 *  Deadline for authors to submit papers
	 */
	private final Date my_submission_DL;
	
	/**
	 * Deadline for reviewers to have reviews completed
	 */
	private final Date my_review_DL;
	
	/**
	 * Deadline for SPC to have recommendations completed
	 */
	private final Date my_spc_recommendation_DL;
	
	/**
	 * Deadline for PCs to accept/reject paper 
	 */
	private final Date my_decision_DL;
	
	/**
	 * Location of conference. In format of
	 * Building, City, State/Province, Country
	 */
	private final String my_location;
	
	/**
	 * Number of attendees expect to attend conference 
	 */
	private final int my_size;
	
	/**
	 * No param Constructor for empty/blank conference object.
	 * To be used in development only.
	 */
	public Conference(  ) {
		this(-1, " ", null, null, null, null, null, null, " ", 0);
	}

	/**
	 *  Constructor of Conference object
     *
	 * Creates a fully initialized conference.
	 * @param the_id The unique identifier for a conference.
	 * @param the_name The Human Readable Name of a conference.
	 * @param the_sd The Start Date of the Conference
	 * @param ed The End Date of the Conference
	 * @param dec The Decision Deadline
	 * @param rec The Recommendation Deadline
	 * @param rev The Review Deadline
	 * @param sub The Submission Deadline
	 * @param the_location Location of conference
	 * @param the_size Expected attendees of conference
	 */
	public Conference(final int the_id, final String the_name, final Date the_sd, 
			final Date the_ed, final Date the_sub, final Date the_rev, final Date the_rec, 
			final Date the_dec, final String the_location, final int the_size) {
		my_conf_ID = the_id;
		my_name = the_name;
		my_start_date = the_sd;
		my_end_date = the_ed;
		my_decision_DL= the_dec;
		my_spc_recommendation_DL = the_rec;
		my_review_DL = the_rev;
		my_submission_DL = the_sub;
		my_location = the_location;
		my_size = the_size;
	}
	
	/**
	 *  Returns unique conference ID
	 *  @return The Conference ID of the conference.
	 */
	public int getConfID() {
		return my_conf_ID;
	}
    
	/**
	 * Sets conference id
	 * @param the_confID the unique conference ID
	 */
	public void setConfID(int the_confID) {
		this.my_conf_ID = the_confID;
	}
	
	/**
	 *  Returns the conference name
	 *  @return Returns the name of the conference.
	 */
	public String getConfName() {
		return my_name;
	}
	
	/**
	 *  Returns the state date of conference
	 *  @return Returns the start date of the conference.
	 */
	public Date getStartDate() {
		return my_start_date;
	}

	/**
	 *  Returns conference end date
	 *  @returns the End Date of the conference.
	 */
	public Date getEndDate() {
		return my_end_date;
	}

	/**
	 *  Returns decision on paper deadline date
	 *  @returns the descision deadling of the conference.
	 */
	public Date getDecisionDL() {
		return my_decision_DL;
	}
	
	/**
	 * Returns SPC recommendation deadline date
	 * @returns Returns The recommendation deadlind.
	 */
	public Date getRecommendationDL() {
		return my_spc_recommendation_DL;
	}
	
	/**
	 * Returns the Review Deadline for the conference.
	 * @return Returns The review deadline for the conference.
	 */
	public Date getReviewDL() {
		return my_review_DL;
	}
	
	/**
	 *  Returns submission deadline date
	 *  @return Returns the submission deadling for the conference.
	 */
	public Date getSubmissionDL() {
		return my_submission_DL;
	}
	
	/**
	 * Returns location of conference in format of
	 * @return The location of the conference.
	 */
	public String getLocation() {
		return my_location;
	}
	
	/**
	 * Returns number of expected attendees for conference
	 * @return The expected number of attendees for the conference.
	 */
	public int getSize() {
		return my_size;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public String toString()
	{
		return my_name;
	}
}